home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / dhg_100.zip / DHGREPPM.HLP (.txt) < prev    next >
OS/2 Help File  |  1997-05-17  |  14KB  |  348 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. DH-Grep-PM ΓòÉΓòÉΓòÉ
  3.  
  4. General information about DH-Grep-PM 
  5.  
  6. Grep stands for "Get Regular Expression and Print" and is a text searching tool 
  7. that was first developed for unix systems and has been ported to most operating 
  8. systems. 
  9.  
  10. This PM version of grep is designed as a user friendly application.  It is 
  11. designed for a multitasking environment and the search takes place on a 
  12. separate thread to minimize the time that the wait icon is displayed. It will 
  13. also run in a low priority idle mode to further reduce the impact the search 
  14. has on the other active programs. 
  15.  
  16. The often cryptic command line options have been replaced with easy to use 
  17. selections on the OS/2 menu bar. The output of the search is sent to a PM 
  18. window and the user has easy access to all of the information that was found by 
  19. the program. 
  20.  
  21. To reduce the overhead, the results are buffered until the search is completed 
  22. and then written to the results window.  To indicate that the search is still 
  23. active, the small icon at the left of the title bar will change color as an 
  24. activity indicator. The color change depends on the search results, so it does 
  25. not change at a fixed rate. 
  26.  
  27. This program can search binary files as well as text files, but it still tries 
  28. to read "lines" from the binary file.  The program reads from the file until a 
  29. new-line character is found or 4096 characters have been read.  This means that 
  30. some of the "lines" will contain null characters. The C/C++ string handling 
  31. functions all use a null character as a string terminator and the "line" will 
  32. be truncated at the first null character by those functions.  This means that 
  33. the program may miss finding the search pattern in a binary file, and other 
  34. methods should be used for searching in binary files. 
  35.  
  36. This version of grep does not support the full set of "regular expressions" 
  37. that most of the command line versions of grep support.  It does support two 
  38. wild-card characters.  The '*' character represents multiple characters and the 
  39. character '?' represents one character. Thus a search pattern of "h*e"  would 
  40. match both "house" and "horse". A search pattern of "ho?se" would also match 
  41. both words. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 1.1. Binary Files ΓòÉΓòÉΓòÉ
  45.  
  46. This program can search binary files as well as text files, but it still tries 
  47. to read "lines" from the binary file.  The program reads from the file until a 
  48. new-line character is found or 4096 characters have been read.  This means that 
  49. some of the "lines" will contain null characters. The C/C++ string handling 
  50. functions all use a null character as a string terminator and the "line" will 
  51. be truncated at the first null character by those functions.  This means that 
  52. the program may miss finding the search pattern in a binary file, and other 
  53. methods should be used for searching in binary files. 
  54.  
  55.  
  56. ΓòÉΓòÉΓòÉ 1.2. Regular Expressions ΓòÉΓòÉΓòÉ
  57.  
  58. This version of grep does not support the full set of "regular expressions" 
  59. that most of the command line versions of grep support.  It does support two 
  60. wild-card characters.  The '*' character represents multiple characters and the 
  61. character '?' represents one character. Thus a search pattern of "h*e"  would 
  62. match both "house" and "horse". A search pattern of "ho?se" would also match 
  63. both words. 
  64.  
  65.  
  66. ΓòÉΓòÉΓòÉ 1.3. File ΓòÉΓòÉΓòÉ
  67.  
  68. This menu selection opens a pull-down menu that contains selections to save, 
  69. reload, or print the results of the search. The external editor is also on this 
  70. menu. 
  71.  
  72.  
  73. ΓòÉΓòÉΓòÉ 1.3.1. Save As ΓòÉΓòÉΓòÉ
  74.  
  75. The Save As selection opens a file dialog box that allows the user to enter a 
  76. file name to use for saving the search results. If the user enters the name of 
  77. an existing file, the utility will warn the user and ask for verification 
  78. before writing the file. 
  79.  
  80.  
  81. ΓòÉΓòÉΓòÉ 1.3.2. Load File ΓòÉΓòÉΓòÉ
  82.  
  83. The Load File selection opens a file dialog box that allows the user to select 
  84. a file to load into the results window. 
  85.  
  86.  
  87. ΓòÉΓòÉΓòÉ 1.3.3. Print On Default Printer ΓòÉΓòÉΓòÉ
  88.  
  89. The Print On Default Printer selection sends the contents of the results window 
  90. to the default system printer. This is a raw dump of the results window to the 
  91. default system printer and no attempt to format the text. 
  92.  
  93.  
  94. ΓòÉΓòÉΓòÉ 1.3.4. Load Marked File In External Editor ΓòÉΓòÉΓòÉ
  95.  
  96. To use the external editor option, you must create a CMD file named 
  97. EDIT_CMD.CMD that calls the editor you wish to use.  A minimal CMD file to use 
  98. the OS/2 system editor E would contain the following line. 
  99.  
  100. e %1 
  101.  
  102. The CMD file should be located in the working directory. 
  103.  
  104. To use the external editor, the cursor must be on a line that contains the name 
  105. of a file that was found during the search. After the cursor is on the line, 
  106. either an ALT+W key press or a Right Mouse Button double click will launch the 
  107. CMD file. The cusror can be moved to a specific line by a Left Mouse Button 
  108. click. 
  109.  
  110. Note:  The RMB double click will not move the cursor to the desired line. 
  111.  
  112.  
  113. ΓòÉΓòÉΓòÉ 1.4. Display ΓòÉΓòÉΓòÉ
  114.  
  115. This menu selection opens a pull-down menu that contains selections that affect 
  116. how the results are displayed after the search has been completed. 
  117.  
  118.  
  119. ΓòÉΓòÉΓòÉ 1.4.1. Font ΓòÉΓòÉΓòÉ
  120.  
  121. The Font selection opens a standard OS/2 Font dialog box that lets the user 
  122. select a new font or change the font size for the displayed results. 
  123.  
  124.  
  125. ΓòÉΓòÉΓòÉ 1.4.2. Word Wrap ΓòÉΓòÉΓòÉ
  126.  
  127. The Word Wrap selection enables or disables the word wrap feature of the 
  128. results window. 
  129.  
  130. Note:  The Word Wrap is a software word wrap and it does not insert hard 
  131.        carriage return - line feed  pairs. 
  132.  
  133.  
  134. ΓòÉΓòÉΓòÉ 1.4.3. Do not clear past results ΓòÉΓòÉΓòÉ
  135.  
  136. This selection disables the clearing of the results window when a new search is 
  137. started.  It is useful if the user wishes to save the search results from 
  138. several related searches. 
  139.  
  140.  
  141. ΓòÉΓòÉΓòÉ 1.4.4. Reset to default colors ΓòÉΓòÉΓòÉ
  142.  
  143. The results window will only accept primary colors for the background color, 
  144. but the default color of the results window on my PC is a manila folder yellow. 
  145. I prefer that color, so I added this option to be able to reset the background 
  146. color. 
  147.  
  148. Note:  The background and foreground colors of the results window may be set 
  149.        via drag and drop from the OS/2 Color Palette. The other colors may also 
  150.        be changed, but only the background and foreground colors of the results 
  151.        window are saved. 
  152.  
  153.  
  154. ΓòÉΓòÉΓòÉ 1.4.5. Get file names in display ΓòÉΓòÉΓòÉ
  155.  
  156. This selection will cause the program to scan all of the results text and 
  157. extract the file names and insert them at the top of the results window.  This 
  158. provides the user with a list of file names that can be imported into another 
  159. document or used by another program. 
  160.  
  161.  
  162. ΓòÉΓòÉΓòÉ 1.4.6. Edit ΓòÉΓòÉΓòÉ
  163.  
  164. The results window is an MLE (MultiLine Editor) window and it has the basic 
  165. OS/2 editor functions. This selection brings up a submenu with the available 
  166. edit functions. 
  167.  
  168.  
  169. ΓòÉΓòÉΓòÉ 1.5. Configure Search ΓòÉΓòÉΓòÉ
  170.  
  171. This menu selection opens a pull-down menu that contains selections to 
  172. configure the search and the search parameters. 
  173.  
  174.  
  175. ΓòÉΓòÉΓòÉ 1.5.1. Case Sensitive Search ΓòÉΓòÉΓòÉ
  176.  
  177. When this option is checked, the search is case sensitive.  The default is to 
  178. ignore case in the search pattern. 
  179.  
  180.  
  181. ΓòÉΓòÉΓòÉ 1.5.2. Set absolute flag ΓòÉΓòÉΓòÉ
  182.  
  183. When this option is checked, the search pattern is absolute. The two wild-card 
  184. characters are treated as characters and not wild-cards. 
  185.  
  186. Regular Expressions 
  187.  
  188.  
  189. ΓòÉΓòÉΓòÉ 1.5.3. Search Subdirectories ΓòÉΓòÉΓòÉ
  190.  
  191. When this option is checked, the program starts the search in the specified 
  192. directory and searches in all subdirectories (recursively) for files that match 
  193. the file mask. The default is to not search in subdirectories. 
  194.  
  195.  
  196. ΓòÉΓòÉΓòÉ 1.5.4. Set NOT Flag ΓòÉΓòÉΓòÉ
  197.  
  198. When this option is checked, the search results will contain all the lines that 
  199. do not contain the search pattern. This means that all of the lines in a file 
  200. that does not contain the search pattern would be displayed in the results 
  201. window. 
  202.  
  203.  
  204. ΓòÉΓòÉΓòÉ 1.5.5. Set NAME Flag ΓòÉΓòÉΓòÉ
  205.  
  206. When this option is checked, only the names of files that contain the search 
  207. pattern are displayed in the results window. 
  208.  
  209.  
  210. ΓòÉΓòÉΓòÉ 1.5.6. Show Line Numbers ΓòÉΓòÉΓòÉ
  211.  
  212. When this option is checked, line numbers are included in the results window. 
  213. This makes it easier to find the search pattern when the file is loaded into an 
  214. editor. 
  215.  
  216.  
  217. ΓòÉΓòÉΓòÉ 1.5.7. Use idle time priority for search thread ΓòÉΓòÉΓòÉ
  218.  
  219. When this option is checked, the priority of the thread that does the searching 
  220. is reduced to the lowest priority. This priority only gets processing time when 
  221. there is no other work to do.  This option allows the user to do a search in 
  222. the background without a significant impact on the other active tasks. 
  223.  
  224.  
  225. ΓòÉΓòÉΓòÉ 1.5.8. Files newer than Age Mask ΓòÉΓòÉΓòÉ
  226.  
  227. When this option is checked, only files with dates newer or equal to the Age 
  228. Mask value will be evaluated. 
  229.  
  230. File Age 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 1.5.9. Files older than Age Mask ΓòÉΓòÉΓòÉ
  234.  
  235. When this option is checked, only files with dates older than the Age Mask 
  236. value will be evaluated. *p. File Age 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 1.5.10. Skip known binary files ΓòÉΓòÉΓòÉ
  240.  
  241. When this option is checked, the utility will skip the following known binary 
  242. file types by looking at the file extent. 
  243.  
  244.  .exe, .dll, .lib, .ico, .gif, .jpg 
  245.  
  246.  .zip, .inf, .hlp, .obj, .com, .res 
  247.  
  248. This utility will try to search for the search pattern in any file. If you know 
  249. the extent of the files you wish to search, you should use that extent in the 
  250. file mask to reduce the number of files that are searched. 
  251.  
  252. If you are not sure of the file extent and you know that you do not need to 
  253. search any binary files, then this option should be selected. 
  254.  
  255. Binary Files 
  256.  
  257.  
  258. ΓòÉΓòÉΓòÉ 1.5.11. Search for files only, no pattern search ΓòÉΓòÉΓòÉ
  259.  
  260. When this option is checked, the utility will just search for files that match 
  261. the file mask and the other search parameters. The contents of the file will 
  262. not be checked. 
  263.  
  264.  
  265. ΓòÉΓòÉΓòÉ 1.5.12. Enter Search Parameters ΓòÉΓòÉΓòÉ
  266.  
  267. This selection opens a dialog box that has 4 entry fields. 
  268.  
  269. Search Path 
  270.  
  271. File Mask 
  272.  
  273. Search Pattern 
  274.  
  275. File Age 
  276.  
  277. All the fields except 'File Age' must be filled in or the search cannot be 
  278. started. 
  279.  
  280. The 'Search Path' is checked to see if a valid path has been entered when the 
  281. user clicks on the 'Ok' or 'Start' buttons. 
  282.  
  283.  
  284. ΓòÉΓòÉΓòÉ 1.5.12.1. Search Path ΓòÉΓòÉΓòÉ
  285.  
  286. The search path consists of the Drive letter and the path without the file 
  287. name. 
  288.  
  289. For Example:  C:\OS2\APPS\ 
  290.  
  291. The ending '\' is not required 
  292.  
  293.  
  294. ΓòÉΓòÉΓòÉ 1.5.12.2. Browse ΓòÉΓòÉΓòÉ
  295.  
  296. The Browse button opens a File Dialog box that will allow the user to select a 
  297. search path.  This is a standard File Dialog box, but the file name information 
  298. is not used.  The file name listbox portion of the File Dialog box is still 
  299. useful to determine if you have the correct directory. 
  300.  
  301. Note:  Even though the file name is not used, there must be a valid OS/2 file 
  302.        name in the file name entry field. 
  303.  
  304.  
  305. ΓòÉΓòÉΓòÉ 1.5.12.3. File Mask ΓòÉΓòÉΓòÉ
  306.  
  307. The file mask consists of the file name without any path information. Wild 
  308. cards are allowed. 
  309.  
  310.  
  311. ΓòÉΓòÉΓòÉ 1.5.12.4. Search Pattern ΓòÉΓòÉΓòÉ
  312.  
  313. The search pattern can contain up to 512 characters. The use of the wild-card 
  314. characters depends on the setting of the Set absolute flag 
  315.  
  316.  
  317. ΓòÉΓòÉΓòÉ 1.5.12.5. File Age ΓòÉΓòÉΓòÉ
  318.  
  319. The File Age entry is used when one of the age limit options is used. The 
  320. number can be in the range 0 to 999 days.  The lower range of zero is used to 
  321. indicate today when the 'newer than' search option is checked. 
  322.  
  323. Files newer than Age Mask 
  324.  
  325. Files older than Age Mask 
  326.  
  327.  
  328. ΓòÉΓòÉΓòÉ 1.5.13. Save option settings in program INI file ΓòÉΓòÉΓòÉ
  329.  
  330. When option is selected, the current configuration information, the size and 
  331. location of the application window, the background and foreground colors, the 
  332. current font and font size are saved in the file named DHGREPPM.INI. 
  333.  
  334.  
  335. ΓòÉΓòÉΓòÉ 1.6. Start ΓòÉΓòÉΓòÉ
  336.  
  337. This selection on the menu bar is used to start the search.  The selection is 
  338. inactive until the search parameters have been entered and while the search is 
  339. in progress.  The 'Start' button on the 'Enter Search Parameters' dialog box 
  340. performs the same action as the selection on the menu bar. * 
  341.  
  342.  
  343. ΓòÉΓòÉΓòÉ 1.7. Stop ΓòÉΓòÉΓòÉ
  344.  
  345. This selection on the menu bar is used to stop the search.  The selection is 
  346. inactive until the search is in progress and becomes inactive when the search 
  347. has been completed or stopped.  A dialog box is displayed when 'Stop' is 
  348. selected and the user is asked to verify that he wants to stop the search. *